import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/Login"
import HomePage from "../views/HomePage"
import Register from "../views/Register"
import ArriveMange from '../views/ArriveMange'
import DormitoryMange from '../views/DormitoryMange'
import Information from '../views/Information'
import BillMange from '../views/BillMange'
import ArriveInformation from "@/views/manger/ArriveInformation"
import UserInformation from "@/views/manger/UserInformation"
import DormitoryInformation from "@/views/manger/DormitoryInformation"
import StudentInformation from "@/views/manger/StudentInformation"
import SumInformation from "@/views/manger/SumInformation"
import ArriveListInformation from '@/views/manger/ArriveListInformation'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Login',
    component: Login
}, {
    path: '/Register',
    name: 'Register',
    component: Register
}, {
    path: '/HomePage',
    name: 'HomePage',
    component: HomePage,
    children: [{
            path: '/ArriveMange',
            name: 'ArriveMange',
            component: ArriveMange,
        }, {
            path: '/DormitoryMange',
            name: 'DormitoryMange',
            component: DormitoryMange
        },
        {
            path: '/Information',
            name: 'Information',
            component: Information
        },
        {
            path: '/BillMange',
            name: 'BillMange',
            component: BillMange
        },
        {
            path: '/ArriveInformation',
            name: 'ArriveInformation',
            component: ArriveInformation
        }, {
            path: '/UserInformation',
            name: 'UserInformation',
            component: UserInformation
        }, {
            path: '/DormitoryInformation',
            name: 'DormitoryInformation',
            component: DormitoryInformation
        }, {
            path: '/StudentInformation',
            name: 'StudentInformation',
            component: StudentInformation
        },
        {
            path: '/SumInformation',
            name: 'SumInformation',
            component: SumInformation
        }, {
            path: '/ArriveListInformation',
            name: 'ArriveListInformation',
            component: ArriveListInformation
        },

    ]
}]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router